package com.zjt.utils;

/**
 * Created with IntelliJ IDEA.
 * User: xueyanbeijing
 * Date: 12-9-17
 * Time: PM5:05
 * To change this template use File | Settings | File Templates.
 */
public class StringUtil {
    /**
     * 字符串截取
     * @param str
     * @param length
     * @return
     */
    public static String subString(String str,int length)
    {
        try
        {
            if (str!=null&&str.length()>13)
            {
                str = str.substring(0,length-2);
                str = str +  "..";
            }
        }catch (Exception e){}
        return str;
    }
}
